package com.felix.demo;

import lombok.Data;

import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.HashMap;

/**
 * Demo
 *
 * @author xuejinhua
 * @date 2018/10/31 10:50
 */
public class Demo {
    public static void main(String[] args) {
        new Children();
    }

    static {

    }

    public static synchronized void method() {
        Comparator<Integer> comparator = Integer::compareTo;
    }
}

@Data
class Person {
    void draw() {
        System.out.println("Glyph.draw()");
    }

    Person() {
        System.out.println("Glyph() before draw()");
        draw();
        System.out.println("Glyph() after draw()");
    }
}

@Data
class Children extends Person {
    private int radius = 1;

    Children() {
        System.out.println("RoundGlyph.RoundGlyph(), radius = " + radius);
    }

    Children(int r) {
        radius = r;
        System.out.println("RoundGlyph.RoundGlyph(), radius = " + radius);
    }

    void draw() {
        System.out.println("RoundGlyph.draw(), radius = " + radius);
    }
}
